package com.huiruan.utils;

import lombok.Getter;

/**
 * 返回结果枚举
 */
@Getter
public enum ResultCode {
    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    VALIDATE_FAILED(400, "参数检验失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关权限"),
    USER_ACCOUNT_DISABLED(1001, "账号已被禁用"),
    USER_ACCOUNT_NOT_EXIST(1002, "账号不存在"),
    USER_ACCOUNT_PASSWORD_ERROR(1003, "账号或密码错误"),
    CAPTCHA_ERROR(1004, "验证码错误"),
    CAPTCHA_EXPIRE(1005, "验证码已过期"),
    WX_LOGIN_FAILED(2001, "微信登录失败");

    private final Integer code;
    private final String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}